package com.smart.admin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * 优惠券表
 */
@ApiModel(value = "优惠券表")
@Data
@TableName(value = "tb_coupon")
public class Coupon {
    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "ID")
    private Long id;

    /**
     * 优惠券标题（有图片则显示图片）：无门槛50元优惠券 | 单品最高减2000元
     */
    @TableField(value = "title")
    @ApiModelProperty(value = "优惠券标题（有图片则显示图片）：无门槛50元优惠券 | 单品最高减2000元")
    private String title;

    /**
     * 图片
     */
    @TableField(value = "icon")
    @ApiModelProperty(value = "图片")
    private String icon;

    /**
     * 可用于：10店铺优惠券 11新人店铺券  20商品优惠券  30类目优惠券  60平台优惠券 61新人平台券
     */
    @TableField(value = "used")
    @ApiModelProperty(value = "可用于：10店铺优惠券 11新人店铺券  20商品优惠券  30类目优惠券  60平台优惠券 61新人平台券")
    private Integer used;

    /**
     * 1满减券 2叠加满减券 3无门槛券（需要限制大小）
     */
    @TableField(value = "`type`")
    @ApiModelProperty(value = "1满减券 2叠加满减券 3无门槛券（需要限制大小）")
    private Integer type;

    /**
     * 1可用于特价商品 2不能  默认不能(商品优惠卷除外)
     */
    @TableField(value = "with_special")
    @ApiModelProperty(value = "1可用于特价商品 2不能  默认不能(商品优惠卷除外)")
    private Integer withSpecial;

    /**
     * 店铺或商品流水号
     */
    @TableField(value = "with_sn")
    @ApiModelProperty(value = "店铺或商品流水号")
    private String withSn;

    /**
     * 满多少金额
     */
    @TableField(value = "with_amount")
    @ApiModelProperty(value = "满多少金额")
    private Long withAmount;

    /**
     * 用券金额
     */
    @TableField(value = "used_amount")
    @ApiModelProperty(value = "用券金额")
    private Long usedAmount;

    /**
     * 配额：发券数量
     */
    @TableField(value = "quota")
    @ApiModelProperty(value = "配额：发券数量")
    private Integer quota;

    /**
     * 已领取的优惠券数量
     */
    @TableField(value = "take_count")
    @ApiModelProperty(value = "已领取的优惠券数量")
    private Integer takeCount;

    /**
     * 已使用的优惠券数量
     */
    @TableField(value = "used_count")
    @ApiModelProperty(value = "已使用的优惠券数量")
    private Integer usedCount;

    /**
     * 发放开始时间
     */
    @TableField(value = "start_time")
    @ApiModelProperty(value = "发放开始时间")
    private Date startTime;

    /**
     * 发放结束时间
     */
    @TableField(value = "end_time")
    @ApiModelProperty(value = "发放结束时间")
    private Date endTime;

    /**
     * 时效:1绝对时效（领取后XXX-XXX时间段有效）  2相对时效（领取后N天有效）
     */
    @TableField(value = "valid_type")
    @ApiModelProperty(value = "时效:1绝对时效（领取后XXX-XXX时间段有效）  2相对时效（领取后N天有效）")
    private Integer validType;

    /**
     * 使用开始时间
     */
    @TableField(value = "valid_start_time")
    @ApiModelProperty(value = "使用开始时间")
    private Date validStartTime;

    /**
     * 使用结束时间
     */
    @TableField(value = "valid_end_time")
    @ApiModelProperty(value = "使用结束时间")
    private Date validEndTime;

    /**
     * 自领取之日起有效天数
     */
    @TableField(value = "valid_days")
    @ApiModelProperty(value = "自领取之日起有效天数")
    private Integer validDays;

    /**
     * 1生效 2失效 3已结束
     */
    @TableField(value = "`status`")
    @ApiModelProperty(value = "1生效 2失效 3已结束")
    private Integer status;

    @TableField(value = "create_user")
    @ApiModelProperty(value = "")
    private Long createUser;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @TableField(value = "update_user")
    @ApiModelProperty(value = "")
    private Long updateUser;

    /**
     * 修改时间
     */
    @TableField(value = "update_time")
    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

    /**
     * 批次ID 同批次的可以组合使用,不同批次的不能互斥
     */
    @TableField(value = "batch_id")
    @ApiModelProperty(value = "批次ID 同批次的可以组合使用,不同批次的不能互斥")
    private Long batchId;

    public static final String COL_ID = "id";

    public static final String COL_TITLE = "title";

    public static final String COL_ICON = "icon";

    public static final String COL_USED = "used";

    public static final String COL_TYPE = "type";

    public static final String COL_WITH_SPECIAL = "with_special";

    public static final String COL_WITH_SN = "with_sn";

    public static final String COL_WITH_AMOUNT = "with_amount";

    public static final String COL_USED_AMOUNT = "used_amount";

    public static final String COL_QUOTA = "quota";

    public static final String COL_TAKE_COUNT = "take_count";

    public static final String COL_USED_COUNT = "used_count";

    public static final String COL_START_TIME = "start_time";

    public static final String COL_END_TIME = "end_time";

    public static final String COL_VALID_TYPE = "valid_type";

    public static final String COL_VALID_START_TIME = "valid_start_time";

    public static final String COL_VALID_END_TIME = "valid_end_time";

    public static final String COL_VALID_DAYS = "valid_days";

    public static final String COL_STATUS = "status";

    public static final String COL_CREATE_USER = "create_user";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_USER = "update_user";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_BATCH_ID = "batch_id";
}